<?php get_header(); ?>
<div id="box">
    <div id="container">        
        <div id="content">            
            <div id="product">
                <div class="tit-pro"><h3><?php single_cat_title();?></h3></div>
                <ul class="items-pro">
                    <?php
                    $term_id = $id = get_queried_object(); // ID of taxonomy term
                    $taxonomy = 'cat-product';
                    $term_obj = get_term($term_id, $taxonomy);
                    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                    $args = array(
                        'post_type' => 'product',
                        'cat-product' => $term_obj->slug,
                        'post_status' => 'publish',
                        'posts_per_page' => 11,
                        'paged' => $paged
                    );
                    $my_query = null;
                    $my_query = new WP_Query($args);
                    $i = 1;
                  
                    while ($my_query->have_posts()):$my_query->the_post();
                        if ($i % 4 == 1) {
                            ?>                            
                            <li class="item-pro">
                                <ul>
                                <?php } ?>
                                <li>
                                    <a href="<?php the_permalink(); ?>">
                                    <?php the_post_thumbnail(); ?></a>
                                    <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?> 
                                        </a></p>                                    
                                </li>
                                <?php
                                if ($i % 4 == 0) {
                                    ?> </ul><div class="clear"></div><div class="hr"></div></li>
                                    <?php
                                }
                                $i++;
                            endwhile;
                            wp_reset_query();
                            ?>
                </ul>
            </div>
            <div class="clear"></div>
        </div>
        <div id="sidebar">
            <? get_sidebar(); ?>
        </div>
        <div class="clear"></div>
        <div id="bottom">
            <div class="l">
                <h4>SEAWEALTH VN COMPANY LIMITED</h4>
                <p>Address: 121 LY Tu Trong Street, 3 ward, Vung  Tau city, Viet Nam</p>
                <p>Phone: 0646 250 579 - 568 - 679</p>
                <p>Email: info@namviet-it.com</p> 
            </div>
            <div class="r">
                <?php
                wp_nav_menu(array(
                    'theme_location' => 'secondary-menu',
                    'menu_id' => 'bot-nav')
                );
                ?> 
                <p>Copyright 2013 by <a href="http://localhost/seafood/">http://seawealthvn.com.</a> Allright Reserved.</p>
                <p class="r">Design by <a href="http://namviet-it.com">namviet</a></p>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>

        </div>  
    </div>
</div>
<?php get_footer(); ?>
